<template>
	<view class="w100">
		<view class="w100 rowSpaceBetween" @click="showPopup">
			<text class="tipsText" style="font-size: 24rpx;"> {{title}}</text>
			<uv-icon name="arrow-right" size="14" color="#777"></uv-icon>
		</view>
		<fui-bottom-popup :show="show" @close="closePopup">
			<view class="fui-scroll__wrap">
				<view class="fui-title">{{title}}</view>
				<view class="fui-icon__close defultFontStyle" @click="closePopup">
					取消
				</view>
				<view class="fui-icon__confim defultFontStyle" @click="success">
					确定
				</view>
				<slot name="content"></slot>
			</view>
		</fui-bottom-popup>
	</view>
</template>

<script>
	export default {
		name: "poupCheckbox",
		props: {
			title: {
				type: String,
				default: "请选择"
			},
		},
		data() {
			return {
				show: false,
			}
		},
		methods: {
			//调用此方法显示底部弹出层
			showPopup(type) {
				this.show = true
			},
			closePopup(type) {
				this.show = false
			},
			success() {
				this.show = false
				this.$emit('confirm')
			}
		}
	}
</script>

<style lang="scss" scoped>
	.fui-scroll__wrap {
		padding-top: 30rpx;
		position: relative;
	}

	.fui-title {
		font-size: 26rpx;
		font-weight: bold;
		text-align: center;
		padding-bottom: 24rpx;
	}

	.fui-icon__close {
		position: absolute;
		top: 24rpx;
		left: 24rpx;
	}

	.fui-icon__confim {
		position: absolute;
		top: 24rpx;
		right: 24rpx;
	}


</style>